package indzcraft.loader;
import java.util.Arrays;
import java.util.HashMap;

public class GearBuffDB {
	
	private HashMap<Integer,GearBuff> gearBuffDB = new HashMap<Integer,GearBuff>();
	int[] ignorelist = new int[]{69210,46874,77950,65905,73526};
	
	public GearBuffDB(){
		Arrays.sort(ignorelist);
		populateDB();
	}
	
	public GearBuffDB.GearBuff getGearBuff(int id){
		if(gearBuffDB.containsKey(id)){
			return gearBuffDB.get(id);
		}
		//if(!(Arrays.binarySearch(ignorelist, id) >= 0))
		//	System.out.println("unknown gearbuffid:"+  id);
		return null;
	}
	
	private void populateDB() {
		gearBuffDB.put(77979, new GearBuff("vial_of_shadows_lfr"));
		gearBuffDB.put(77207, new GearBuff("vial_of_shadows"));
		gearBuffDB.put(77999, new GearBuff("vial_of_shadows_heroic"));
		gearBuffDB.put(77945, new GearBuff("dagger_combat_buff")); // stage1
		gearBuffDB.put(77947, new GearBuff("dagger_combat_buff")); // stage2
		gearBuffDB.put(77949, new GearBuff("dagger_combat_buff")); // stage3
		gearBuffDB.put(68994, new GearBuff("matrix_restabilizer"));
		gearBuffDB.put(69150, new GearBuff("matrix_restabilizer_heroic"));
		gearBuffDB.put(72897, new GearBuff("arrow_of_time"));
		gearBuffDB.put(77197, new GearBuff("wrath_of_unchaining"));
		gearBuffDB.put(77994, new GearBuff("wrath_of_unchaining_heroic"));
		gearBuffDB.put(77974, new GearBuff("wrath_of_unchaining_lfr"));
		gearBuffDB.put(68927, new GearBuff("the_hungerer"));
		gearBuffDB.put(69112, new GearBuff("the_hungerer_heroic"));
		gearBuffDB.put(77202, new GearBuff("starcatcher_compass"));
		gearBuffDB.put(77993, new GearBuff("starcatcher_compass_heroic"));
		gearBuffDB.put(77973, new GearBuff("starcatcher_compass_lfr"));
		gearBuffDB.put(77188, new GearBuff("no_kaled"));
		gearBuffDB.put(77113, new GearBuff("kiroptyric_sigil"));
		gearBuffDB.put(73648, new GearBuff("badge_of_conquest_403"));
	}
	
	public HashMap<Integer, GearBuff> getAll(){
		return this.gearBuffDB;
	}

	public class GearBuff{
		private String name = "";
		
		public GearBuff(String n){
			name = n;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getName() {
			return name;
		}
	}
}

